package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TIncomeLogMapper;
import com.ruoyi.business.domain.TIncomeLog;
import com.ruoyi.business.service.ITIncomeLogService;

/**
 * 收益流水Service业务层处理
 * 
 * @author laoguo
 * @date 2025-08-12
 */
@Service
public class TIncomeLogServiceImpl implements ITIncomeLogService 
{
    @Autowired
    private TIncomeLogMapper tIncomeLogMapper;

    /**
     * 查询收益流水
     * 
     * @param logId 收益流水主键
     * @return 收益流水
     */
    @Override
    public TIncomeLog selectTIncomeLogByLogId(Long logId)
    {
        return tIncomeLogMapper.selectTIncomeLogByLogId(logId);
    }

    /**
     * 查询收益流水列表
     * 
     * @param tIncomeLog 收益流水
     * @return 收益流水
     */
    @Override
    public List<TIncomeLog> selectTIncomeLogList(TIncomeLog tIncomeLog)
    {
        return tIncomeLogMapper.selectTIncomeLogList(tIncomeLog);
    }

    /**
     * 新增收益流水
     * 
     * @param tIncomeLog 收益流水
     * @return 结果
     */
    @Override
    public int insertTIncomeLog(TIncomeLog tIncomeLog)
    {
        tIncomeLog.setCreateTime(DateUtils.getNowDate());
        return tIncomeLogMapper.insertTIncomeLog(tIncomeLog);
    }

    /**
     * 修改收益流水
     * 
     * @param tIncomeLog 收益流水
     * @return 结果
     */
    @Override
    public int updateTIncomeLog(TIncomeLog tIncomeLog)
    {
        return tIncomeLogMapper.updateTIncomeLog(tIncomeLog);
    }

    /**
     * 批量删除收益流水
     * 
     * @param logIds 需要删除的收益流水主键
     * @return 结果
     */
    @Override
    public int deleteTIncomeLogByLogIds(Long[] logIds)
    {
        return tIncomeLogMapper.deleteTIncomeLogByLogIds(logIds);
    }

    /**
     * 删除收益流水信息
     * 
     * @param logId 收益流水主键
     * @return 结果
     */
    @Override
    public int deleteTIncomeLogByLogId(Long logId)
    {
        return tIncomeLogMapper.deleteTIncomeLogByLogId(logId);
    }
}
